//
//  BillCell.swift
//  Slaughter
//
//  Created by 邱仙凯 on 2018/12/24.
//  Copyright © 2018 zwb. All rights reserved.
//

import UIKit

class ZyaBillCell: UITableViewCell {

    @IBOutlet weak var lab1: UILabel!
    @IBOutlet weak var lab2: UILabel!
    @IBOutlet weak var lab3: UILabel!
    @IBOutlet weak var lab4: UILabel!
    @IBOutlet weak var lab5: UILabel!
    @IBOutlet weak var lab6: UILabel!
    @IBOutlet weak var btnStatus: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        btnStatus.setTitle("状态", for: UIControl.State())
        btnStatus.layer.borderWidth = 1
        btnStatus.layer.borderColor = Theme.primaryColor().cgColor
        btnStatus.layer.cornerRadius = 5
        btnStatus.setTitleColor(Theme.primaryColor(), for: .normal)
    }
    var one = ZyaBillModel(JSON: ["id_key" : ""]) {
        didSet {
            lab1.text = one!.sMonth!.count > 0 ? one!.sMonth : "暂无"
            lab2.text = one!.sClientNm!.count > 0 ? one!.sClientNm : "暂无"
            lab3.text = "\(one?.sMoneyXz ?? 0)"
            lab4.text = "\(one?.sMoneyYsjeSy ?? 0)"
            lab5.text = "\(one?.sMoneyYsjeBy ?? 0)"
            lab6.text = "\(one?.sMoneyFk ?? 0)"
            btnStatus.isHidden = true
            // 需求变更
//            if one!.url == "0" {
//                btnStatus.setTitle("未签署", for: .normal)
//                btnStatus.layer.borderColor = #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1).cgColor
//                btnStatus.setTitleColor(#colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1), for: .normal)
//            } else {
//                btnStatus.setTitle("已签署", for: .normal)
//                btnStatus.layer.borderColor = Theme.primaryColor().cgColor
//                btnStatus.setTitleColor(Theme.primaryColor(), for: .normal)
//            }
            
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
